package data.connector.rippling.api.base;

import com.fasterxml.jackson.databind.JsonNode;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;

import java.time.LocalDateTime;

/**
 *
 * @author Alex bob(https://github.com/vnobo)
 * @date Created by 2020/3/26
 */
@Data
@Builder
@AllArgsConstructor
public class ResultMessageModel {

    private MessageModelAction action;
    private MessageModelType type;
    private JsonNode entity;
    private LocalDateTime sendTime;
    private Integer tenantId;

    public enum MessageModelType {
        COMPANIES, EMPLOYEES, DEPARTMENTS, CUSTOM_FIELDS, LEVELS, PAY_SCHEDULES, COMPANY_DEDUCTIONS,EMPLOYEE_DEDUCTIONS, LEAVE_REQUESTS, COMPANY_ACTIVITY
    }

    public enum MessageModelAction {
        ADD, DELETE, UPDATE
    }
}
